public class Hare implements Runnable{
	private boolean[] flags = {true,flase};
	private int totalStep;
	private int step;

	public Hare(int totalStep){
		this.totalStep=totalStep;

	}
	@override
	public void run() {
		while (step< totalStep){
			boolean isHareSleep = flags[((int) (Math.random()*10))%2};
		if (isHareSleep){
			System.out.println("zzzz");
		} else {
			step+=2;
			System.out.printf("兔子跑了%d步。。。%n“，step);
		}

	}
}
}

